/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.inteligencia.stage.dataaccess.domain.hibernate;

import com.inteligencia.stage.dataaccess.base.hibernate.HibernateGenericDAO;
import com.inteligencia.stage.dataaccess.domain.AuditorioEventoDAO;
import com.inteligencia.stage.dataaccess.model.TaudiEveVO;
import java.io.Serializable;
import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Restrictions;

/**
 *
 * @author igorov
 */
public class HibernateAuditorioEventoDAO extends HibernateGenericDAO<TaudiEveVO, Integer> implements AuditorioEventoDAO{

    public HibernateAuditorioEventoDAO() {
        super(TaudiEveVO.class);
    }

    @Override
    public List<TaudiEveVO> getByEvento(int idEvento) {
        DetachedCriteria detachedCriteria = DetachedCriteria.forClass(TaudiEveVO.class);
        detachedCriteria.add(Restrictions.eq("tevento.ncodeve", idEvento));
        List<TaudiEveVO> taudiEveVOs = listByCriteria(detachedCriteria);
        
        return taudiEveVOs;
    }
    
}
